package com.itheima06;

import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        TreeSet<Car> c1 = new TreeSet<>();
        c1.add(new Car("Benchi", 30, 2000));
        c1.add(new Car("BaoMa", 30, 2500));
        c1.add(new Car("AoDi", 25, 3000));
        c1.add(new Car("BaoShiJie", 50, 2000));
        c1.add(new Car("Wulinhongguang", 10, 8000));
        c1.add(new Car("LanBoJini", 90, 1000));
        c1.add(new Car("ChangCheng", 10, 8000));
        c1.forEach(c-> System.out.println(c));
    }
}
